feat(swagger): Upgrade to swagger and migrate to springdocs #1198
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This replaces spring fox with spring docs to the latest releases.
Primary migration guide: https://springdoc.org/migrating-from-springfox.html
MOST Of the changes are done downstream in various services that need to replace springfox resources and older outdated openapi spec APIs. See: https://github.com/spinnaker/gate/pull/1813/files for an example of this change.
This can mostly be automated through the use of openrewrite (which that PR documents). See https://docs.openrewrite.org/recipes/java/springdoc/swaggertospringdoc for the details of what this rewrite recipe applies. It DID NOT handle most groovy files which require a bit more hand holding on the migration. This does clean up the dependency tree fairly nicely finally!
TO NOTE: OpenAPI was completely broken due to various library upgrades (primarily spring fox to 3.0 to fix a CVE). Per various conversations (e.g. springfox/springfox#3193 (comment)) there were attempts to try to make spring fox 3 which has some CVE fixes work with swagger & newer openapis, but it seems to be a struggle to get these to work, and the springfox no longer seems supported. See springfox/springfox#3834 for another example of "this library is dead and doesn't even work" on latest spring boot releases.